////////////////////
// Enterprise Device Attributes
////////////////////
/**
 * Use the `Browser.enterprise.deviceAttributes` API to read device attributes.
 *
 * Permissions: "enterprise.deviceAttributes"
 *
 * Note: Only available to policy installed extensions.
 * @platform ChromeOS only
 * @since Chrome 46
 */
export namespace enterprise {
    export namespace deviceAttributes {
        /**
         * @description Fetches the value of the device identifier of the directory API, that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API.
         * @param callback Called with the device identifier of the directory API when received.
         */
        export function getDirectoryDeviceId(callback: (deviceId: string) => void): void {
            Wab.callFunctionAsync({ funcName: 'enterprise.deviceAttributes.getDirectoryDeviceId' }).then(callback)
        }
        /**
         * @since Chrome 66
         * @description
         * Fetches the device's serial number.
         * Please note the purpose of this API is to administrate the device
         * (e.g. generating Certificate Sign Requests for device-wide certificates).
         * This API may not be used for tracking devices without the consent of the device's administrator.
         * If the current user is not affiliated, returns an empty string.
         * @param callback Called with the serial number of the device.
         */
        export function getDeviceSerialNumber(callback: (serialNumber: string) => void): void {
            Wab.callFunctionAsync({ funcName: 'enterprise.deviceAttributes.getDeviceSerialNumber' }).then(callback)
        }
        /**
         * @since Chrome 66
         * @description
         * Fetches the administrator-annotated Asset Id.
         * If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
         * @param callback Called with the Asset ID of the device.
         */
        export function getDeviceAssetId(callback: (assetId: string) => void): void {
            Wab.callFunctionAsync({ funcName: 'enterprise.deviceAttributes.getDeviceAssetId' }).then(callback)
        }
        /**
         * @since Chrome 66
         * @description
         * Fetches the administrator-annotated Location.
         * If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
         * @param callback Called with the Annotated Location of the device.
         */
        export function getDeviceAnnotatedLocation(callback: (annotatedLocation: string) => void): void {
            Wab.callFunctionAsync({ funcName: 'enterprise.deviceAttributes.getDeviceAnnotatedLocation' }).then(callback)
        }
        /**
         * @since Chrome 82
         * @description
         * Fetches the device's hostname as set by DeviceHostnameTemplate policy.
         * If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
         * @param callback Called with the hostname of the device.
         */
        export function getDeviceHostname(callback: (hostname: string) => void): void {
            Wab.callFunctionAsync({ funcName: 'enterprise.deviceAttributes.getDeviceHostname' }).then(callback)
        }
    }
}